package BIOtest03;

import java.io.IOException;
import java.io.OutputStream;
import java.io.PrintStream;
import java.io.PrintWriter;
import java.net.Socket;
import java.util.Scanner;

public class Client {
    public static void main(String[] args)  {
        try {
            Socket socket = new Socket("127.0.0.1",9000);
            OutputStream outputStream = socket.getOutputStream();
            PrintStream printstream = new PrintStream(outputStream);
            Scanner input = new Scanner(System.in);
            while (true){
                System.out.print("请输入：");
                String msg = input.next();
                printstream.println(msg);
                printstream.flush();
            }
        } catch (IOException e) {
            e.printStackTrace();
        }

    }
}
